package kr.co.icebird.temp;

import java.util.HashMap;
import java.util.Map;
import java.util.Random;

import kr.co.icebird.spring3.config.util.ChartBuilder;
import kr.co.icebird.spring3.config.util.ChartBuilder.ChartType;

public class MapTest {

	/**
	 * @param args
	 * @throws Exception 
	 */
	public static void main(String[] args) throws Exception {
		
		
		Map param = new HashMap<String, Object>();
		int[] data = {3,4,5,2,8,4,3,5};
		Random random = new Random();


		ChartBuilder builder = new ChartBuilder();
		/*
		builder.addValue("에이1", "비1", 1);
		builder.addValue("에이1", "비2", 2);
		builder.addValue("에이1", "비3", 3);
		builder.addValue("에이1", "비4", 4);
		
		builder.addValue("에이2", "비1", 2);
		builder.addValue("에이2", "비2", 3);
		builder.addValue("에이2", "비3", 4);
		builder.addValue("에이2", "비4", 1);
		
		builder.addValue("에이3", "비1", 3);
		builder.addValue("에이3", "비2", 4);
		builder.addValue("에이3", "비3", 1);
		builder.addValue("에이3", "비4", 2);
		*/
		for(int i=0; i < 10; i++){
			builder.addValue(  "판매율",String.valueOf(i+1), data[random.nextInt(data.length)]);
		}
		
		builder.createChartFile(ChartType.BAR, "제목", "X축", "Y축", "c:/temp/test.png");
	}
}
